tooltip: fix line wrapping
authorMichael Catanzaro <mcatanzaro@gnome.org>
Sun, 5 Oct 2014 14:07:58 +0000 (09:07 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 7 Oct 2014 01:30:18 +0000 (21:30 -0400)
We enable line wrap on the internal GtkLabel, but nowadays this does
nothing unless we also set a max number of characters.

https://bugzilla.gnome.org/show_bug.cgi?id=737929

gtk/gtktooltip.c

index 3e585e32e4d108c1e8381cdd8f261daa82a7c703..103944f2f0e2e043c7155d3e36e15e49ede3f8b7 100644 (file)
@@ -205,6 +205,7 @@ gtk_tooltip_init (GtkTooltip *tooltip)
 
   label = gtk_label_new ("");
   gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
+  gtk_label_set_max_width_chars (GTK_LABEL (label), 70);
   gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 0);
 
   tooltip->window = window;